home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1997 September
/
Macworld (1997-09).dmg
/
Shareware World
/
Utilities
/
Text Processing
/
Alpha
/
Help
/
Tcl Library - auto-loading
< prev
next >
Wrap
Text File
|
1994-03-08
|
986b
|
24 lines
Alpha now supports auto-loading of tcl procs. In order to use this
facility, you need to create an index file for each directory that contains
tcl files and add that directory to the definition of 'auto_path' at the
end of of ":Tcl:SystemCode:AlphaBits.tcl". This index file must be
recreated each time you add or delete file or procs within files from these
directories.
Index files are created by the 'auto_mkindex' proc. 'auto_mkindex' takes
two arguments, a directory name, and a string pattern (not a regular
expression, see the documentation of 'string match' from the Tcl help file
for more details on string patterns) used to define the files from that
directory that need to be indexed.
For example, if I've added a new file or proc to a file in the UserCode
directory supplied with this release, I go to the Tcl shell (from the
File menu), and do the following:
Alpha ƒ> cd
Alpha ƒ> auto_mkindex :Tcl:Usercode *.tcl
auto_mkindex :Tcl:Usercode *.tcl
Alpha ƒ>